<div class="modal-header">
	<h5 class="modal-title mt-0" id="exampleModalLabel">{$vo['id'] ? '编辑楼层' : '增加楼层'}</h5>
	<button type="button" class="close" data-dismiss="modal" aria-label="Close">
	  <span aria-hidden="true">&times;</span>
	</button>
</div>
<div class="modal-body">
  <div class="form-group">
	<label for="floor_name" class="control-label">楼层名称:</label>
	<input type="text" class="form-control" id="floor_name" name="floor_name" maxlength="20" autocomplete="off" value="{$vo.floor_name}">
  </div>
  <div class="form-group">
	<label for="floor" class="control-label">楼层号:</label>
	<input type="number" class="form-control" id="floor" name="floor" value="{$vo.floor}">
  </div>
</div>
<div class="modal-footer">
	<input type="hidden" name="act" value="{$vo['id'] ? 'edit' : 'add'}" />
	<input type="hidden" name="id" value="{$vo.id}" />
	<input type="hidden" name="project_id" value="{$Think.request.project_id}" />
	<button type="submit" class="btn btn-info px-4">{$vo['id'] ? '立即保存' : '立即添加'}</button>
</div>
<script>
function changeType(){
	var cpn_type = $('#cpn_type').val();
	var url = "{:U('getControlType')}";
	var html = '<option value="0">请选择</option>';

	$.getJSON(url, {cpn_type: cpn_type}, function(res){
		if(res){
			for(var i=0; i<res.length; i++){
				html += '<option>' + res[i] + '</option>';
			}
			$('#control_type').html(html);
		}
	});
}
</script>